]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dbus: Add FlashArea method
authorAdel Gadllah <adel.gadllah@gmail.com>
Thu, 9 Feb 2012 18:57:29 +0000 (19:57 +0100)
committerAdel Gadllah <adel.gadllah@gmail.com>
Mon, 20 Feb 2012 20:54:06 +0000 (21:54 +0100)
Add a new dbus method that takes an area (x, y, width, height) and fires a
flashspot on it.

This would be useful for applications like totem and cheese.

https://bugzilla.gnome.org/show_bug.cgi?id=669660

js/ui/shellDBus.js

index 523338312c13c205d54e3baad48a25e449c2b573..5fd65e12b3cbd7576318cce4fdb07b526ad52038 100644 (file)
@@ -50,6 +50,12 @@ const GnomeShellIface = <interface name="org.gnome.Shell">
     <arg type="s" direction="in" name="filename"/>
     <arg type="b" direction="out" name="success"/>
 </method>
+<method name="FlashArea">
+    <arg type="i" direction="in" name="x"/>
+    <arg type="i" direction="in" name="y"/>
+    <arg type="i" direction="in" name="width"/>
+    <arg type="i" direction="in" name="height"/>
+</method>
 <method name="EnableExtension">
     <arg type="s" direction="in" name="uuid"/>
 </method>
@@ -191,6 +197,11 @@ const GnomeShell = new Lang.Class({
                                     flash, invocation));
     },
 
+    FlashArea: function(x, y, width, height) {
+        let flashspot = new Flashspot.Flashspot({ x : x, y : y, width: width, height: height});
+        flashspot.fire();
+    },
+
     ListExtensions: function() {
         let out = {};
         for (let uuid in ExtensionUtils.extensions) {